package com.jiangxiaofei.citycloud.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jiangxiaofei.citycloud.R;
import com.jiangxiaofei.citycloud.bean.NeedBean;

import java.util.List;

/**
 * @author: JiangXFei
 * @date: 2017/11/8 0008
 * @content: 需求列表适配器
 */

public class NeedListAdapter extends BaseQuickAdapter<NeedBean, BaseViewHolder> {

    public NeedListAdapter(int layoutResId, @Nullable List<NeedBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, NeedBean item) {
        helper.setText(R.id.tv_title, item.getTitle());
        helper.setText(R.id.tv_phone, item.getPhonenum());
        helper.setText(R.id.tv_distance, "距离"+item.getDistance());
        helper.setText(R.id.tv_date, item.getIssue());
    }

}
